package main.main;

import android.content.Context;
import android.graphics.*;
import android.view.WindowManager;

public class Brick {
	private Bitmap myImage;
	private int myX, myY, myId, myWidth;
	public static int WIDTH=0, HEIGHT=0, MARGIN=0;
	public static int BrickCount=1, COLS=10, ROWS=5;
	public Brick(Context cxt, int x, int y, int width) {
		BitmapFactory.Options options = new BitmapFactory.Options();
		options.inJustDecodeBounds = true;
		myId = BrickCount;
		BrickCount++;
		if (WIDTH==0) {
			setVars(cxt);
		}
		myX=x;
		myY=y;
	}
	public int getX() {return myX;}
	public void setX(int X) {myX=X;}
	public int getY() {return myY;}
	public void setY(int Y) {myY=Y;}
	public int getWidth() {return myWidth;}
	public void setWidth(int W) {myWidth=W;}
	public int getId() {return myId;}
	public Bitmap getImage() {return myImage;}
	public static void setVars(Context cxt) {
		WindowManager manager = (WindowManager) cxt.getSystemService(Context.WINDOW_SERVICE);
		HEIGHT=724;//manager.getDefaultDisplay().getHeight();
		WIDTH=manager.getDefaultDisplay().getWidth();
		MARGIN=WIDTH/(COLS*20);
	}
}
